import { get } from '../request'

const bill = {
  // 获取个人账户的所有流水
  getPageOfPersonalBill(param) {
    return get(
      '/bill/personal',
      param
    )
  },
  // 获取近一周个人账户流水
  getPageOfPersonalWeekBill(param) {
    return get(
      '/bill/personal/week',
      param
    )
  },
  // 获取近一月个人账户流水
  getPageOfPersonalMonthBill(param) {
    return get(
      '/bill/personal/month',
      param
    )
  },


  // 获取商店账户的所有流水
  getPageOfStoreBill(storeId, param) {
    return get(
      `/bill/store/${storeId}`,
      param
    )
  },
  // 获取近一周商店账户流水
  getPageOfStoreWeekBill(storeId, param) {
    return get(
      `/bill/store/week/${storeId}`,
      param
    )
  },
  // 获取近一月商店账户流水
  getPageOfStoreMonthBill(storeId, param) {
    return get(
      `/bill/store/month/${storeId}`,
      param
    )
  },


  // 获取商城利润账户的所有流水
  getPageOfMallProfitBill(param) {
    return get(
      '/bill/mall-profit',
      param
    )
  },
  // 获取近一周商城利润账户流水
  getPageOfMallProfitWeekBill(param) {
    return get(
      '/bill/mall-profit/week',
      param
    )
  },
  // 获取近一月商城利润账户流水
  getPageOfMallProfitMonthBill(param) {
    return get(
      '/bill/mall-profit/month',
      param
    )
  },


  // 统计个人账户流水
  personalAccountStatistics(type) {
    return get(
      `/bill/personal/statistics/${type}`
    )
  },
  // 统计商店账户流水
  storeAccountStatistics(storeId, type) {
    return get(
      `/bill/store/${storeId}/statistics/${type}`
    )
  },
  // 统计商城利润账户流水
  mallProfitAccountStatistics(type) {
    return get(
      `/bill/mall-profit/statistics/${type}`
    )
  },
}

export default bill;
